package com.cy.Controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/consumer/")
public class FeignConsumerController {
    @Value("#{spring.application.name}")
    private String appName;
    @Autowired
    private ConsumerHttpApi consumerHttpApi;
    @GetMapping("/consumer/doFeignEcho")
    public String doFeignEcho(){
        return consumerHttpApi.echoMessage(appName);
    }
}
